<template>
  <view class="my-search-container" @click="searchBarClickHandler">
    
    <!-- 这是一个没有输入功能的假输入框，点击后直接跳转到单独的搜索页面-->
    <view class="my-search-box">
      <uni-icons color="#6d6d6d" type="search" size="14"></uni-icons>
      <text class="placeholder">搜索商品</text>
    </view>
    
  </view>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods:{
    searchBarClickHandler(){
        // uni.navigateTo({
        //     url:`/pages_sub1/product-detail/product-detail?goodsId=${goodsId}`
        // })
        this.$emit('click')
        // console.log('可以跳转搜索页')
    }
  }
}
</script>

<style scoped lang="scss">
.my-search-container {
  background-color: #fff;
  height: 100rpx;
  padding: 0 20rpx;
  display: flex;
  align-items: center;
}

.my-search-box {
  height: 64rpx;
  background-color: #f7f7f7;
  border-radius: 30rpx;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  .placeholder {
    font-size: 28rpx;
    margin-left: 10rpx;
    color: #6d6d6d;
  }
}
</style>
